<template>
    <div>
        <el-col :span="24" class="action-bar">
            <el-button type="primary" size="medium" @click="reBack">返回</el-button>
        </el-col>
        
        <div class="form-wrapper">
           <div class="form-table">
                <h1>订单信息详情</h1>
         <el-form :label-position="'left'" label-width="120px" >
            <el-form-item label="订单编号" >
                <div>{{tableData.order_num}}</div>
            </el-form-item>

            <el-form-item label="快递公司" >
                <div>{{tableData.express_name}}</div>
            </el-form-item>
            <el-form-item label="快递单号" >
                <div>{{tableData.express_num}}</div>
            </el-form-item>

            <el-form-item label="发货时间" >
                <div>{{tableData.express_time}}</div>
            </el-form-item>
            <el-form-item label="配送地址" >
                <div>{{tableData.address}}</div>
            </el-form-item>
            <el-form-item label="订单状态" >
                <div>{{tableData.statusName}}</div>
            </el-form-item>
        </el-form>
           </div>

        </div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            orderDetail:{},
            id:'',
            tableData:''
        }
    },
    methods:{
        reBack(){
            this.$router.replace('ExchangeList')
        },
        async ordersDetails(){
            //获取订单详情
            let params={
                id:this.id
            }
            let res=await this.$api.ordersDetails(params);
            if(res.data.level=='success'){
                this.tableData=res.data.data
            }
        }
    },
    mounted() {
        this.id=this.$route.query.id;
	  this.ordersDetails()
    },
}
</script>
<style lang="scss" scoped>
    .form-wrapper{
       display: flex;
       justify-content: center;
       width:100%;
       flex-wrap: wrap;
       .form-table{
           margin:20px;
           display: flex;
            justify-content: center;
            flex-wrap: wrap;
            width: 80%;
            border: 1px solid #eee;
            box-shadow: #eee 5px 5px 20px;
            padding:20px;
            h1{
                width: 100%;
                font-size: 24px;
                color:red;
            }
       }
    }
</style>